package cn.edu.scau.disk.service;

import cn.edu.scau.disk.exception.CommonException;
import cn.edu.scau.disk.pojo.File;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;

import java.util.List;

//@Service
public interface FileService{
    void FormFileSystem() throws CommonException;
    void CreateFile(Integer id,String name,Integer type,Integer userid) throws CommonException;
    void WriteFile(Integer id,String data,String name) throws CommonException;
    String ReadFile(Integer fid,String name) throws CommonException;
    void DeleteFile(Integer fid,String name) throws CommonException;
    void RenameFile(Integer id,String oldname,String newname) throws CommonException;
    List<File> ListFile(String keyword);
    public void DeleteDir(Integer fid,Integer id) throws CommonException;
    void DEBUG() throws CommonException;
    void Delete(Integer fid,String name)throws CommonException;
    File Showfileinfo(Integer fid,String name)throws CommonException;
    List<Integer> ShowdiskList(Integer fid,String name)throws CommonException;
    public void FormatAll();
    public List<File> ListSingleFile(Integer id,String keyword) throws CommonException;
    public List<Integer> showDirDisks();
}
